package com.zzzs.single;

/**
 * 静态内部类
 * @author zhu_shuai
 * @since 2021/6/28
 */
public class Holder {

    private Holder() {

    }
    public static Holder getInstance() {
        return InnerClass.HOLDER;
    }
    // 使用静态内部类的方式创建单例
    private static class InnerClass{
        private static final Holder HOLDER = new Holder();
    }

}
